package com.candoit.webapps.pricing.controllers;

import java.util.List;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

import com.candoit.webapps.pricing.model.Linea;
import com.candoit.webapps.pricing.util.QueryUtil;

@ManagedBean(name = "rentabilidadLineaCtrl")
@SessionScoped
public class RentabilidadPorLineaController extends AbstractController{

	public List<Linea> getLineasDisponibles(){
		return QueryUtil.getInstance().getLineas();
	}
	
	public void grabarRentabilidad(){
        for (Linea linea :getLineasDisponibles()){
                this.update(linea);
        }    
	 }
	
}
